package com.example.demo.controller;

import com.example.demo.config.BeanConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.converter.json.GsonBuilderUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/v")
public class PropertiesController {

        @Value("${my.key}")
        private String myKey;
        @Value("${my.key1}")
        private Integer myKey1;
        @Value("${my.key2}")
        private Boolean myKey2;

        @RequestMapping("/value")
        public String readValue(){
                System.out.println("myKey:" + myKey );
                return "myKey:" + myKey + "    " +
                 "myKey1:" + myKey1 + "    " +
                 "myKey2:" + myKey2;
        }


}
